import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'login',
    component: ()=>import('../views/login.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: ()=>import('../views/home.vue'),
    children:[
      {
        path:"dity",
        name:'dity',
        component:()=>import('../views/dity.vue')
      },
      {
        path:"order",
        name:'order',
        component:()=>import('../views/order.vue')
      },
      {
        path:"system",
        name:'system',
        component:()=>import('../views/system.vue')
      },
    ]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
